<?php defined('SYSPATH') or die('No direct script access.');

class Controller_WWW_AliPay extends Controller_Template
{
    public function __construct($req, $res)
    {
        parent::__construct($req, $res);
        $this->template = 'smarty:payment/blank';
    }

    public function action_alipay(){
        $pay = Paysdk::instance("alipay");
        $parameter = array(
            "out_trade_no"	=> time(),
            "total_fee"	=> 0.01,//元
            "body"	=> '应用豆1个',
        );
        $form = $pay->set_info($parameter)->get_form("继续支付");
        $this->template->set_filename('smarty:chong/creat_order');
        $this->template->set('form',$form);
//        echo $form;
//        var_dump($pay);
    }
}